<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/11/22/022
 * Time: 18:08
 */

namespace app\api\validate;


class LoginValidate extends BaseValidate {

    protected $rule = [
        'username' => 'require|isNotEmpty',
        'password' => 'require|isNotEmpty',
        'mobile' => 'require|mobile',
        'code' => 'require|length:4|isPositiveInteger',
    ];

    protected $scene = [
        'admin'  =>  ['username','password'],
        'member' => ['mobile','code'],
    ];
}